package cn.edu.xmu.oomall.liquidation.microservice;

import cn.edu.xmu.oomall.liquidation.microservice.vo.OrderItemVo;
import cn.edu.xmu.oomall.liquidation.microservice.vo.SimpleOrderVo;
import cn.edu.xmu.oomall.liquidation.model.vo.PageVo;
import cn.edu.xmu.privilegegateway.annotation.util.InternalReturnObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author HertzLiu
 * @create_time 2021/12/17 10:12
 * @package_name cn.edu.xmu.oomall.liquidation.microservice
 * @project_name oomall
 * @product_name IntelliJ IDEA
 * @description 订单模块
 */

@FeignClient(name = "order-service")
public interface OrderService {
    @GetMapping("/internal/orders/{id}/orderitems")
    public InternalReturnObject<PageVo<OrderItemVo>> getOrderItemsByOrderId(@RequestParam Long orderId);
    @GetMapping("/orders/{id}")
    public InternalReturnObject<SimpleOrderVo> getOrderById(@RequestParam Long id);
    @GetMapping("internal/orderitems/{id}")
    public InternalReturnObject<OrderItemVo> getOrderItemById(@RequestParam Long id);
}
